//
//  MyOrderCollectionViewCell.m
//  CommunitySupermarketProiect
//
//  Created by 吕惠卿 on 2017/11/20.
//  Copyright © 2017年 吕惠卿. All rights reserved.
//

#import "MyOrderCollectionViewCell.h"

@implementation MyOrderCollectionViewCell
-(id)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self creatUI];
    }
    return self;
}


-(void)creatUI{
    self.lLab = [[UILabel alloc]init];
    self.lLab.text = @"我的订单";
    self.lLab.textColor = [UIColor blackColor];
    self.lLab.font = [UIFont fontWithName:@"ArialMT"size:18];
    self.lLab.textAlignment = NSTextAlignmentLeft;
    [self addSubview:self.lLab];
    [self.lLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.mas_left).with.offset(12);
        make.height.mas_equalTo(25);
        make.width.mas_equalTo(150);
        make.centerY.mas_equalTo(self);
    }];
    
    self.jImg = [[UIImageView alloc]init];
    self.jImg.image = [UIImage imageNamed:@"我的右三角"];
    [self addSubview:self.jImg];
    [self.jImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.mas_right).with.offset(-10);
        make.width.mas_equalTo(7);
        make.height.mas_equalTo(15);
        make.centerY.mas_equalTo(self);
    }];
    
    self.rLab = [[UILabel alloc]init];
    self.rLab.textColor = [UIColor lightGrayColor];
    self.rLab.text = @"查看";
    self.rLab.font = [UIFont systemFontOfSize:13.0];
    self.rLab.textAlignment = NSTextAlignmentRight;
    [self addSubview:self.rLab];
    [self.rLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.jImg.mas_left).with.offset(-5);
        make.height.mas_equalTo(30);
        make.width.mas_equalTo(70);
        make.centerY.mas_equalTo(self);
    }];
    _line = [[UIImageView alloc]init];
    _line.backgroundColor = LineColor;
    [self addSubview:_line];
    [_line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.contentView.mas_bottom).with.offset(0);
        make.left.equalTo(self.contentView.mas_left).with.offset(0);
        make.right.equalTo(self.contentView.mas_right).with.offset(0);
        make.height.mas_equalTo(1);
    }];
}




@end
